#!/usr/bin/perl -w
sub greet {
my $name = $_[0];
stat $second_name;
if ( defined $second_name ) {
  print "Hi $name! $second_name is also in there \n"; 
  } else {
  print "Hi $name You are first in there \n";
  }
$second_name = $name;
}
 
&greet ( Fred );
&greet ( Barney );
